package com.founder.chd_daily_query.entity.alarm;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "ONBOARD_PRICE_MODEL", schema = "RBD_ALARM", catalog = "")
public class OnboardPriceModelEntity {
    private String contractTransportId;
    private String contractId;
    private String contractCode;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date effectiveDateB;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date effectiveDateE;
    private String transportType;
    private String stationB;
    private String stationE;
    private Long transAmount;
    private String planAttribute;
    private String fuelSort;
    private Long qnet;
    private String mineId;
    private String vendorId;
    private String receiveOrgId;
    private Long onboardPrice;
    private String status;
    private Long difference;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private Long onboardPriceMin;
    private String contractName;
    private String contractTransportIdMin;

    @Id
    @Column(name = "CONTRACT_TRANSPORT_ID")
    public String getContractTransportId() {
        return contractTransportId;
    }

    public void setContractTransportId(String contractTransportId) {
        this.contractTransportId = contractTransportId;
    }

    @Basic
    @Column(name = "CONTRACT_ID")
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "CONTRACT_CODE")
    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    @Basic
    @Column(name = "EFFECTIVE_DATE_B")
    public Date getEffectiveDateB() {
        return effectiveDateB;
    }

    public void setEffectiveDateB(Date effectiveDateB) {
        this.effectiveDateB = effectiveDateB;
    }

    @Basic
    @Column(name = "EFFECTIVE_DATE_E")
    public Date getEffectiveDateE() {
        return effectiveDateE;
    }

    public void setEffectiveDateE(Date effectiveDateE) {
        this.effectiveDateE = effectiveDateE;
    }

    @Basic
    @Column(name = "TRANSPORT_TYPE")
    public String getTransportType() {
        return transportType;
    }

    public void setTransportType(String transportType) {
        this.transportType = transportType;
    }

    @Basic
    @Column(name = "STATION_B")
    public String getStationB() {
        return stationB;
    }

    public void setStationB(String stationB) {
        this.stationB = stationB;
    }

    @Basic
    @Column(name = "STATION_E")
    public String getStationE() {
        return stationE;
    }

    public void setStationE(String stationE) {
        this.stationE = stationE;
    }

    @Basic
    @Column(name = "TRANS_AMOUNT")
    public Long getTransAmount() {
        return transAmount;
    }

    public void setTransAmount(Long transAmount) {
        this.transAmount = transAmount;
    }

    @Basic
    @Column(name = "PLAN_ATTRIBUTE")
    public String getPlanAttribute() {
        return planAttribute;
    }

    public void setPlanAttribute(String planAttribute) {
        this.planAttribute = planAttribute;
    }

    @Basic
    @Column(name = "FUEL_SORT")
    public String getFuelSort() {
        return fuelSort;
    }

    public void setFuelSort(String fuelSort) {
        this.fuelSort = fuelSort;
    }

    @Basic
    @Column(name = "QNET")
    public Long getQnet() {
        return qnet;
    }

    public void setQnet(Long qnet) {
        this.qnet = qnet;
    }

    @Basic
    @Column(name = "MINE_ID")
    public String getMineId() {
        return mineId;
    }

    public void setMineId(String mineId) {
        this.mineId = mineId;
    }

    @Basic
    @Column(name = "VENDOR_ID")
    public String getVendorId() {
        return vendorId;
    }

    public void setVendorId(String vendorId) {
        this.vendorId = vendorId;
    }

    @Basic
    @Column(name = "RECEIVE_ORG_ID")
    public String getReceiveOrgId() {
        return receiveOrgId;
    }

    public void setReceiveOrgId(String receiveOrgId) {
        this.receiveOrgId = receiveOrgId;
    }

    @Basic
    @Column(name = "ONBOARD_PRICE")
    public Long getOnboardPrice() {
        return onboardPrice;
    }

    public void setOnboardPrice(Long onboardPrice) {
        this.onboardPrice = onboardPrice;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "DIFFERENCE")
    public Long getDifference() {
        return difference;
    }

    public void setDifference(Long difference) {
        this.difference = difference;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Basic
    @Column(name = "ONBOARD_PRICE_MIN")
    public Long getOnboardPriceMin() {
        return onboardPriceMin;
    }

    public void setOnboardPriceMin(Long onboardPriceMin) {
        this.onboardPriceMin = onboardPriceMin;
    }

    @Column(name = "CONTRACT_NAME")
    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    @Column(name = "CONTRACT_TRANSPORT_ID_MIN")
    public String getContractTransportIdMin() {
        return contractTransportIdMin;
    }

    public void setContractTransportIdMin(String contractTransportIdMin) {
        this.contractTransportIdMin = contractTransportIdMin;
    }

    @Override
    public String toString() {
        return "OnboardPriceModelEntity{" +
                "contractTransportId='" + contractTransportId + '\'' +
                ", contractId='" + contractId + '\'' +
                ", contractCode='" + contractCode + '\'' +
                ", effectiveDateB=" + effectiveDateB +
                ", effectiveDateE=" + effectiveDateE +
                ", transportType='" + transportType + '\'' +
                ", stationB='" + stationB + '\'' +
                ", stationE='" + stationE + '\'' +
                ", transAmount=" + transAmount +
                ", planAttribute='" + planAttribute + '\'' +
                ", fuelSort='" + fuelSort + '\'' +
                ", qnet=" + qnet +
                ", mineId='" + mineId + '\'' +
                ", vendorId='" + vendorId + '\'' +
                ", receiveOrgId='" + receiveOrgId + '\'' +
                ", onboardPrice=" + onboardPrice +
                ", status='" + status + '\'' +
                ", difference=" + difference +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", onboardPriceMin=" + onboardPriceMin +
                ", contractName='" + contractName + '\'' +
                ", contractTransportIdMin='" + contractTransportIdMin + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OnboardPriceModelEntity that = (OnboardPriceModelEntity) o;
        return Objects.equals(contractTransportId, that.contractTransportId) &&
                Objects.equals(contractId, that.contractId) &&
                Objects.equals(contractCode, that.contractCode) &&
                Objects.equals(effectiveDateB, that.effectiveDateB) &&
                Objects.equals(effectiveDateE, that.effectiveDateE) &&
                Objects.equals(transportType, that.transportType) &&
                Objects.equals(stationB, that.stationB) &&
                Objects.equals(stationE, that.stationE) &&
                Objects.equals(transAmount, that.transAmount) &&
                Objects.equals(planAttribute, that.planAttribute) &&
                Objects.equals(fuelSort, that.fuelSort) &&
                Objects.equals(qnet, that.qnet) &&
                Objects.equals(mineId, that.mineId) &&
                Objects.equals(vendorId, that.vendorId) &&
                Objects.equals(receiveOrgId, that.receiveOrgId) &&
                Objects.equals(onboardPrice, that.onboardPrice) &&
                Objects.equals(status, that.status) &&
                Objects.equals(difference, that.difference) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate) &&
                Objects.equals(onboardPriceMin, that.onboardPriceMin) &&
                Objects.equals(contractName, that.contractName) &&
                Objects.equals(contractTransportIdMin, that.contractTransportIdMin);
    }

    @Override
    public int hashCode() {

        return Objects.hash(contractTransportId, contractId, contractCode, effectiveDateB, effectiveDateE, transportType, stationB, stationE, transAmount, planAttribute, fuelSort, qnet, mineId, vendorId, receiveOrgId, onboardPrice, status, difference, createDate, lastUpdateDate, onboardPriceMin, contractName, contractTransportIdMin);
    }
}
